package com.enation.app.shop.front.policyInsurance.area.service;

import com.enation.app.shop.front.policyInsurance.area.entity.City;
import com.enation.framework.database.IDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("CityService")
public class CityService implements CityManager{
    @Autowired
    private IDaoSupport daoSupport;
    @Override
    public List<City> getCityByProvinceId(String id) {
        String sql=" select * from hat_city where father = ?";
        return this.daoSupport.queryForList(sql,City.class,id);
    }

    @Override
    public City getById(String cityId) {
        String sql=" select * from hat_city where cityId = ?";
        return this.daoSupport.queryForObject(sql,City.class,cityId);
    }
}
